import axios from 'axios';
import {adminApiPath} from "./adminApiPath";

const baseUrl = adminApiPath.admin.category;

export const addCategory = async (data: unknown) => {
    const res = await axios.post(baseUrl.add, data);
    return res.data;
};

export const getCategoryPageList = async (data: unknown) => {
    const res = await axios.post(baseUrl.list, data);
    return res.data;
};

export const updateCategory = async (categoryId: number) => {
    const res = await axios.post(baseUrl.delete, categoryId);
    return res.data;
};

export const getCategorySelection = async () => {
    const res = await axios.get(baseUrl.selection);
    return res.data;
};
